package com.chaoyi.service.Impl;

import com.chaoyi.controller.ChannelSwitchController;
import com.chaoyi.dao.mysql.ChannelSwitchMapper;
import com.chaoyi.model.ChannelSwitch;
import com.chaoyi.service.ChannelSwitchService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Auther: 卜加超
 * @Date: 2019/1/3 10:07
 * @Description:
 */
@Service
public class ChannelSwitchServiceImpl implements ChannelSwitchService {
    private Logger log = LoggerFactory.getLogger(ChannelSwitchController.class);
    @Resource
    private ChannelSwitchMapper channelSwitchMapper;
    @Override
    public int findCount(ChannelSwitch channelSwitch) {
        return channelSwitchMapper.getCount(channelSwitch);
    }

    @Override
    public List<ChannelSwitch> findList(int offset, int limit, ChannelSwitch channelSwitch) {
        return channelSwitchMapper.getList(offset,limit,channelSwitch);
    }

    @Override
    public int addChannelSwitchSave(ChannelSwitch entity) {
        return channelSwitchMapper.save(entity);
    }


    @Override
    public ChannelSwitch findChannelSwitchOne(int id) {
        return channelSwitchMapper.selectChannelSwitchOne(id);
    }

    @Override
    public int edit(ChannelSwitch entity) {
        return channelSwitchMapper.edit(entity);
    }

    @Override
    public int deleteChannelSwitch(int id) {
        return channelSwitchMapper.deleteChannelSwitch(id);
    }

    @Override
    public ChannelSwitch selectChannelSwitchByChannel(String channelId) {
        return channelSwitchMapper.selectChannelSwitchByChannel(channelId);
    }


}
